<template>
  <div>
    <div>
    <a-date-picker @change="onChange" v-model="time2" :locale="locale" dropdownClassName="date-day">
     <span>日<a-icon type="caret-down" /></span>
    </a-date-picker>
    </div>
    <span>当前数据呈现周期<br/>{{time2}}</span>
  </div>
</template>
<script>
import moment from "moment";
import "moment/locale/zh-cn";
moment.locale("zh-cn");
import zh_CN from 'ant-design-vue/lib/date-picker/locale/zh_CN'
export default {
  data() {
    return {
      locale: zh_CN,
      time1: undefined,
      time2: undefined,
    };
  },
  methods: {
    onChange(value, dateString) {
      console.log("Selected Time: ", value);
      this.time2 = dateString;
      console.log("Formatted Selected Time: ", dateString);
    },
    onOk(value) {
      console.log("onOk: ", value);
    },
    clearTime() {
      this.time1 = undefined;
    },
  },
};
</script>
<style lang="css">
  .date-day{
    top: 30px;
  }
</style>